import {commonConfig} from "../common";
import {tableOptBtnConfig} from "../table";

export default {
  "tableId": "user",
  "name": "用户",
  "columns": [
    {
      label: '用户名',
      children: [
        {
          key: 'username',
        },
      ]
    },
    {
      label: '姓名',
      children: [
        {
          key: 'name',
        },
      ]
    },
    {
      label: '昵称',
      children: [
        {
          key: 'nickname',
        },
      ]
    },
    {
      label: '电话',
      children: [
        {
          key: 'tel',
          tooltip: true
        },
      ],
    },
    {
      label: '邮箱',
      children: [
        {
          key: 'email',
          tooltip: true
        },
      ]
    },
    {
      label: '角色',
      children: [
        {
          key: 'roleText',
        }
      ],
    },
    {
      label: '公司名称',
      children: [
        {
          key: 'company',
        }
      ],
    },
    {
      label: '职务',
      children: [
        {
          key: 'job',
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 240,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.edit.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.resetPwd.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.delete.type,
          class: 'hover-danger',
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "input",
      key: 'username',
      label: '工号',
    },
    {
      "fieldType": "input",
      key: 'profile.name',
      label: '用户姓名',
    },
    {
      "fieldType": "input",
      key: 'profile.tel',
      label: '电话',
    },
  ]
}
